layui.define(["table", "form"], function(e) {
    var admin = layui.admin;
    var $ = layui.$,
        form = layui.form,
        table = layui.table;
    //监听搜索
    form.on('submit(LAY-user-front-search)', function(data) {
        var field = data.field;
        //执行重载
        table.reload('LAY-user-manage', {
            where: field
        });
    });
    //事件
    var active = {
        
       
    };
    $('.layui-btn.layuiadmin-btn-useradmin').on('click', function() {
        var type = $(this).data('type');
        active[type] ? active[type].call(this) : '';
    });
   
    //表格内处理     
    table.render({
        elem: "#LAY-user-manage",
        url: app_url + "user/creditLogData"+window.location.search,
        skin:'line',
        
        cols: [
            [{
                field: "id",
                title: "ID",
                sort: !0
            }, {
                field: "username",
                title: "用户名",
             
            }, {
                field: "avatar",
                title: "头像",
                width: 100,
                templet: "#imgTpl"
            }, {
                field: "integral",
                title: "信用分",              
               
                
            }, {
                field: "type_txt",
                title: "来源",              
               
                
            }, {
                field: "create_time",
                title: "日期",
                sort: !0
            }
            ]
        ],
        page: !0,
        limit: 10,
        height: "full-220",
        text: "对不起，加载出现异常！"
    }), table.on("tool(LAY-user-manage)", function(e) {

    }), e("creditlog", {})
});